<!-- inc:frame.top -->

<div class="position"><p><!-- inc:position --> &raquo; <a href="{:$mainlink}?file=sysgroup&act=list">管理系统组</a> &raquo; <a href="{:$mainlink}?file=category&act=list&sysgroupid={:$sysgroupid}">分类管理</a> &raquo; <!-- if($cateid) -->添加子分类<!-- else -->添加分类<!-- end --></p><!-- inc:position.fr --></div>

<div class="page_pad">
  <form name="qgform" id="qgform" method="post" action="{:$mainlink}?file=category&act=addliok" onsubmit="return chkadd(this);">
  <input type="hidden" value="{:$sysgroupid}" name="sysgroupid" id="sysgroupid">
  
  <div class="content_box">
    <div class="content_bor">
      <table class="ctable">
        <tr>
          <td class="left">上级分类：<span style="color:red;">*</span></td>
          <!-- if($cateid) -->
          <td class="right"><input class="ginput" type="text" name="tmp_catename" id="tmp_catename" value="{:$catename}" disabled /><input type="hidden" value="{:$cateid}" name="cateid" id="cateid" /></td>
          <!-- else -->
          <td class="right">
            <select name="cateid">
              <option value="0" style="color:red;">设为根分类</option>
              <!-- $catelist AS $key=>$value -->
              <option value="{:$value[id]}">{:$value[space]}{:$value[catename]}&nbsp;{:$value[catename_en]}</option>
              <!-- end -->
            </select>
            &nbsp;
            <span>[请选择一个分类]</span>
          </td>
          <!-- end -->
        </tr>
        <tr>
          <td class="left">分类名称：<span style="color:red;">*</span></td>
          <td class="right">
            <!--if($system[jianti] == on) -->
            <textarea class="gtext" type="text" name="catename" id="catename" style="width:260px; height:300px;" placeholder="简体分类名称"></textarea>
            <!-- end -->
            <!--if($system[fanti] == on) -->
            <textarea class="gtext" type="text" name="catename_ft" id="catename_ft" style="width:260px; height:300px;" placeholder="繁体分类名称"></textarea>
            <!-- end -->
            <!--if($system[english] == on) -->
            <textarea class="gtext" type="text" name="catename_en" id="catename_en" style="width:260px; height:300px;" placeholder="英文分类名称"></textarea>
            <!-- end --><br />[每个分类占一行]
          </td>
        </tr>
        <tr>
          <td class="left"></td>
          <td class="right"><button type="submit" class="gbutton gbutton_dblue gbutton_add creat_button">添加分类</button> &nbsp; <button type="button" class="gbutton gbutton_add" onclick="qgurl('{:$mainlink}?file=category&act=list&sysgroupid={:$sysgroupid}')">返回</button> &nbsp; <span class="show_step" style="color:red;"><img src="images/loading.gif" style="visibility:hidden;" /></span></td>
        </tr>
      </table>
    </div>
  </div><!--content_box-->
  </form>
</div><!--page_pad-->

<script type="text/javascript">
function chkadd()
{
	<!--if($system[jianti] == on) -->
	if(!o.catename.value)
	{
		alert('分类名称不允许为空');
		return false;
	}
	<!-- end -->
	<!--if($system[fanti] == on) -->
	if(!o.catename_ft.value)
	{
		alert('请输入繁体分类名');
		return false;
	}
	<!-- end -->
	<!--if($system[english] == on) -->
	if(!o.catename_en.value)
	{
		alert('请输入英文分类名');
		return false;
	}
	<!-- end -->
	
	if(!o.sysgroupid.value)
	{
		alert('分类信息有误');
		window.location.href="{:$mainlink}?file=sysgroup&act=list";
		return false;
	}
	if(!o.cateid.value)
	{
		alert('分类信息有误');
		return false;
	}
	$(".show_step").html("<img src='images/loading.gif' border='0' align='absmiddle'> 正在保存数据，如果网页没有动静请刷新...");
	$(".creat_button").attr("disabled","disabled");
}
</script>

<!-- inc:frame.bottom -->